from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from appium.webdriver.common.multi_action import MultiAction


def small(dr):
    x = dr.get_window_size()['width']
    y = dr.get_window_size()['height']
    t1 = TouchAction(dr)
    t2 = TouchAction(dr)
    t1.press(x=0.2 * x, y=0.2 * y).wait(1000).move_to(x=0.4 * x, y=0.4 * y).wait(1000).release()
    t2.press(x=0.8 * x, y=0.8 * y).wait(1000).move_to(x=0.6 * x, y=0.6 * y).wait(1000).release()

    m = MultiAction(dr)
    m.add(t1, t2)
    m.perform()
def big(dr):
    x = dr.get_window_size()['width']
    y = dr.get_window_size()['height']
    t1 = TouchAction(dr)
    t2 = TouchAction(dr)
    t1.press(x=0.4 * x, y=0.4 * y).wait(1000).move_to(x=0.2 * x, y=0.2 * y).wait(1000).release()
    t2.press(x=0.6 * x, y=0.6 * y).wait(1000).move_to(x=0.8 * x, y=0.8 * y).wait(1000).release()

    m = MultiAction(dr)
    m.add(t1, t2)
    m.perform()